package com.cyt.${module?replace('/','.')}.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.${module?replace('/','.')}.model.po.${entity};
import com.cyt.${module?replace('/','.')}.model.vo.${entity}Vo;
import com.cyt.sys.model.po.SysUser;
import com.cyt.sys.service.BaseService;
<#if !(showIsRelate?? && showIsRelate !='')>

import java.util.List;
</#if>

/**
 * ${tableComment}Service层接口类
 *
 * @author ${author}
 * @date ${.now}
 */
public interface ${entity}Service extends BaseService<${entity}> {
    <#if !(showIsRelate?? && showIsRelate !='')>

    /**
     * 查询对象集合
     *
     * @param ${entity?uncap_first}Vo 对象
     * @return List 对象集合
     * @author ${author}
     * @date ${.now}
     */
    List<${entity}> listExample(${entity}Vo ${entity?uncap_first}Vo);
    </#if>

    /**
     * 分页查询
     *
     * @param ${entity?uncap_first}Vo 接受参数对象
     * @param pageNum          分页数
     * @param pageSize         每页显示条数
     * @return ReturnResult
     * @author ${author}
     * @date ${.now}
     */
    ReturnResult page(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize);
    <#if (fieldIsRelate?? && fieldIsRelate !='')>

    /**
     * 根据ID获取数据
     *
     * @param id 主键ID
     * @return ${entity}Vo
     * @author ${author}
     * @date ${.now}
     */
    ${entity}Vo selectById(String id);
    </#if>

    /**
     * 添加或更新
     *
     * @param ${entity?uncap_first}Vo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author ${author}
     * @date ${.now}
     */
    ReturnResult addOrUpdate(${entity}Vo ${entity?uncap_first}Vo, SysUser sysUser);

    /**
     * 根据条件逻辑删除
     *
     * @param ${entity?uncap_first}Vo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author ${author}
     * @date ${.now}
     */
    ReturnResult remove(${entity}Vo ${entity?uncap_first}Vo, SysUser sysUser);

    /**
     * 根据条件物理删除
     *
     * @param ${entity?uncap_first}Vo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author ${author}
     * @date ${.now}
     */
    ReturnResult delete(${entity}Vo ${entity?uncap_first}Vo, SysUser sysUser);
}